<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>注册</title>
	<link rel="stylesheet" href="../css/index.css">
	<link rel="stylesheet" href="../css/main.css">
	<script src="../js/jquery.js"></script>
	<script src="../js/index.js"></script>
  <script src="../js/jquery.cookie.js"></script>
<script>
$(function(){
    // 手机号验证
    var TXT=$(".text-1");
    var TXt=$('.text-2');
    console.log(TXt.eq(0))
    TXT.eq(0).blur(function(){
      var u=$(this).val();
      var m_reg=/^(13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|17[0-9]{9}$|18[0-9]{9})|w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*$/;
      if(m_reg.test(u)){
         TXt.eq(0).html('请填写您的手机号码').css("color","#999")
        

      }
      else{
          $('.text-2').eq(0).html('请填写正确的手机号码').css("color","red")

      }    
  })
  // 验证码验证
    TXT.eq(1).blur(function(){
    console.log($('.text-2').eq(1))
      var u=$(this).val();
      var m_reg=/^[0-9]\d{5}$/;
      if(m_reg.test(u)){
         TXt.eq(1).html('请填写收到的短信验证码 PS：60秒内不能再次发送').css("color","#999")
      }
      else{
          TXt.eq(1).html('请输入正确的6位数验证码').css({color:"red",fontSize:"14"})
      }    
    })
  //邮箱验证
  TXT.eq(2).blur(function(){
    console.log($('.text-2').eq(2))
      var u=$(this).val();
      var m_reg=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]+$/;
      if(m_reg.test(u)){
         TXt.eq(2).html('订单信息和优惠信息通过邮件发送').css("color","#999")
      }
      else{
          TXt.eq(2).html('请输入正确的邮箱').css({color:"red",fontSize:"14"})
      }    
  })
  //密码验证
  TXT.eq(3).blur(function(){
    console.log($('.text-2').eq(3))
      var u=$(this).val();
      var m_reg=/^.{6,20}$/;
      if(m_reg.test(u)){
         TXt.eq(3).html('6- 20位，区分大小写').css("color","#999")
      }
      else{
          TXt.eq(3).html('请输入正确的密码格式').css({color:"red",fontSize:"14"})
      }    
    })
  //确认密码是否一致
     TXT.eq(4).blur(function(){
        if(TXT.eq(4).val()== TXT.eq(3).val()){
           TXt.eq(4).html('请再输入一遍上面填写的密码').css("color","#999")
        }
        else{
           TXt.eq(4).html('两次密码不一致').css("color","red")
        } 
    });
  //判断是否点击选择
 
    $('#register1_cbkRead').click(function(){
          e = 0;
          console.log($(this).attr('checked'))
          if($(this).attr('checked')=='checked'){
            e=1;
            TXt.eq(5).html('请阅读风尚协议').css("color","#999")
          }else{
            TXt.eq(5).html('请阅读风尚协议').css("color","red")
          }
    });

    $(".register_btn").click(function(){
        var q=$('#register1_cbkRead').attr("checked")
        var x=$("#register1_cbkRead");
        var f=TXT.eq(4).val();
        var n=TXT.eq(3).val();
        var m=TXT.eq(2).val();
        var u=TXT.eq(0).val();
        var w=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]+$/;
        var m_reg=/^(13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|17[0-9]{9}$|18[0-9]{9})|w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*$/;
        if(e==1&& (m_reg.test(u)) && (w.test(m)) && (n.length>=6 && n.length<=20) && n==f){
            alert("恭喜您，注册成功");
            window.location.href=("Login.html");   
        }
        $.cookie("user",TXT.eq(0).val(),{
          expires : 7,
          path : '/',
        });
        $.cookie("Password",TXT.eq(3).val(),{
          expires : 7,
          path : '/',
        });
    });
    


    

});


</script>
</head>
<body>
<div id="logonew">
    <div id="logol">
        <dl>
            <dt>
            	<a href="../index.html">
                	<img src="../images/logo.gif"  style="height:62px;width:176px;float:left;" />
                    <img id="ImagePageTitle" class="csspaddtop" src="../images/index.png" />                       
                </a>
            </dt>
            <dd style="display: none;"></dd>
        </dl>
	</div>
</div>
<div id="zhucet">
	<div style="height:40px;border-bottom:1px solid #000;width:402px;float:left;"></div>
	<dl>
		<dt>
			<b style="color:#d32402;">新用户注册</b>  
		</dt>
		<dd>
				我已经注册，现在就 <a href="Login.html" style="color:#d32402;">登录</a>
		</dd>
	</dl>
</div>
<div id="zhucec" style="position:relative;">
	<div id="zhucecl">
		<img src="../images/zhuc.png" alt="">
	</div>
	<div id="zhucecr">
		<dl>
   			<dt>
   				<b style="color:#ff0087">*</b>手机：
   			</dt>
   			<dd>
   				<input name="user" type="text" maxlength="11"
        value="" id="txtMobile1" class="text-1" />
        		<span id="lblPhoneError" class="text-2" style="color:#999999;font-size:12px;"> 请填写您的手机号码</span>
        	</dd>
       	</dl>
       	<dl style="height:30px;line-height:30px;"> 
            <dt style="height:30px;float:left;">
               <b style="color:#ff0087">*</b>短信验证码：
            </dt>
            <dd>
                <input type="text" id="RegVCode" class="text-1" style="height:28px;width:166px;float:left;border:1px solid #ccc;margin-right:8px;padding-left:4px;" />
                <a href="javascript:;" id="SendRegVCodeBtn" style="height:28px;width:88px;border:1px solid #ccc;display:block;float:left;line-height:28px;text-align:center;color:#434343;">获取验证码</a>
                <span class="mobiletip text-2" style="font-size:12px;line-height:30px;height:30px;display:block;float:left;color:#999999;">请填写收到的短信验证码 PS：60秒内不能再次发送</span>
            </dd>
        </dl>
        <dl>
   			<dt>
   				<b style="color:#ff0087">*</b>邮箱：
   			</dt>
   			<dd>
   				<input name="register1$txtMobile1" type="text" maxlength="11"
        value="" id="txtMobile1" class="text-1"/>
        		<span id="lblPhoneError" class="text-2" style="color:#999999;font-size:12px;"> 订单信息和优惠信息通过邮件发送</span>
        	</dd>
       	</dl>
       	<dl>
   			<dt>
   				<b style="color:#ff0087">*</b>设置密码：
   			</dt>
   			<dd>
   				<input name="Password" type="text" maxlength="11"
        value="" id="txtMobile1" class="text-1"/>
        		<span id="lblPhoneError" class="text-2" style="color:#999999;font-size:12px;"> 6- 20位，区分大小写</span>
        	</dd>
       	</dl>
       	<dl>
   			<dt>
   				<b style="color:#ff0087">*</b>确认密码：：
   			</dt>
   			<dd>
   				<input name="register1$txtMobile1" type="text" maxlength="11"
        value="" id="txtMobile1" class="text-1"/>
        		<span id="lblPhoneError" class="text-2" style="color:#999999;font-size:12px;"> 请再输入一遍上面填写的密码</span>
        	</dd>
       	</dl>
       	<dl style="margin-top: -10px;">
            <dt>&nbsp;</dt>
            <dd>
            	<input id="register1_cbkRead" type="checkbox" name="register1$cbkRead"
                     style="vertical-align: middle;" class="text-1"/>&nbsp;我已阅读并同意
               	<a href="javascript:;"
                        class="f7 text-2" >《风尚用户注册协议》
                </a>
            </dd>
        </dl>
		<dl style="margin-top: -10px;">
            <dt>&nbsp;</dt>
            <dd>
            	<a href="javascript:" class="register_btn">
            		<img src="http://resource.fstvgo.com/newimage/zhuce.gif" />
                </a>
            </dd>
        </dl>
	</div>
</div>
<div id="copying" style="border-top:1px solid #ccc;">
	<div id="all3" style="text-align:center;padding-top:33px;color:#999999;font-size:12px;line-height:20px;">
		<div style="font-size:18px;font-family:@微软雅黑;font-weight:bold;">
			<a href="javascript:;" style="color:#53585F;font-size:18px;">触屏版</a>&nbsp;&nbsp;<span style="color:#C62717;font-weight:bold;">电脑版</span> 
		</div>
			ICP经营许可证：赣ICP备15000001号<br>
			24小时订购和服务热线：4001-677-077<br>
			Copyright 2008-2014，www.fstvgo.com 风尚购物 版权所有<br>
			本网站用字经北京北大方正电子有限公司授权许可
	</div>
</div>


<!-- <div id="all">
    <div id="all1new">
        <div id="logonew">
            <div id="logol">
                <dl>
                    <dt>
                    	<a href="../index.html">
                        	<img src="../images/logo.gif"  />
                            <img id="ImagePageTitle" class="csspaddtop" src="" />                       
                        </a>
                    </dt>
                    <dd style="display: none;"></dd>
                </dl>
    		</div>
		</div>
		<div id="zhuce">
    		<div id="zhucet">
       			<dl>
            		<dt>
            			<b style="float: left; margin-right: 10px; width: 112px; height: 40px; text-align: center;
                font-size: 14px; background: url(http://resource.fstvgo.com/newimage/zct1.gif) no-repeat;
                color: #e1373a;">新用户注册
                		</b>  
                	</dt>
            		<dd style="margin-right: 160px;">
               			我已经注册，现在就<a href="/Login.aspx">登录</a>
                	</dd>
                </dl>
    		</div>
    		<div id="zhucec">
        		<div id="zhucecl">

           		</div>
        		<div id="zhucecr">
            		<dl>
               			<dt>
               				<b>*</b>手机：
               			</dt>
               			<dd>
               				<input name="register1$txtMobile1" type="text" maxlength="11"
                    value="" id="txtMobile1" onblur="checkMobile(this);" onkeyup="this.value=this.value.replace(/\D/g,'')"
                    onafterpaste="this.value=this.value.replace(/\D/g,'')" class="txt8" /><span id="lblPhoneError">请填写您的手机号码</span>
                    	</dd>
                   	</dl>
            		<dl> 
                		<dt>
                			<b>*</b>短信验证码：
                		</dt>
                		<dd>
                    		<input type="text" id="RegVCode" />
                    		<a href="javascript:void(0);" id="SendRegVCodeBtn" onclick="OpenVCodePanel()">获取验证码</a>
                    		<span class="mobiletip">请填写收到的短信验证码 PS：60秒内不能再次发送</span>
                		</dd>
            		</dl>
            		<dl>
                		<dt>邮箱：</dt>
                		<dd>
                			<input name="register1$txtEmail1" type="text" maxlength="50" id="txtEmail1"
                    class="txt9" onblur="checkEmailOrEmpty(this);" /><span id="lblEmailerror">订单信息和优惠信息通过邮件发送</span>
                   		</dd>
                   	</dl>
            
            		<dl>
                		<dt>
                			<b>*</b>设置密码：
                		</dt>
                		<dd>
                			<input name="register1$txtPassword2" type="password" maxlength="20"
                    id="txtPassword2" onblur="checkPwd1();" class="txt10" /><span id="lblPwd1Message">6
                        - 20位，区分大小写</span>
                        </dd>
                    </dl>
            		<dl>
                		<dt>
                			<b>*</b>确认密码：
                		</dt>
                		<dd>
                			<input name="register1$txtPasswordRe2" type="password"
                    maxlength="20" id="txtPasswordRe2" onblur="checkPwd2();" class="txt10" /><span id="lblPwd2Message">请再输入一遍上面填写的密码</span>
                   		</dd>
                   	</dl>
           			<dl style="display:none;">
               			 <dt>
               			 	<b>*</b>验证码：
               			</dt>
               			<dd>
               				<input name="register1$txtValidCode1" type="text" maxlength="4"
                    id="txtValidCode1" onblur="checkRegValidCode();" class="txt11" /><span id="lblValidCode2"
                        style="margin-top: 10px; float: left;"></span><span><img src="/ValidCode.aspx?type=reg"
                            onclick="this.src='/ValidCode.aspx?type=reg&amp;date=' + new Date();" alt="验证码"
                            id="imgValidCode2" name="imgValidCode" onclick="ChangeValidateImage('imgValidCode','reg');" />&nbsp;<a
                                href="javascript:ChangeValidateImage('imgValidCode2','reg');" title="如果看不清，请点击换一张"
                                class="f6">更换</a>
                      
                                </span>
                        </dd>
                    </dl>
            		<dl style="margin-top: -10px;">
                		<dt>&nbsp;</dt>
                		<dd><input id="register1_cbkRead" type="checkbox" name="register1$cbkRead"
                    checked="checked" style="vertical-align: middle;" />&nbsp;我已阅读并同意<a href="javascript:openRegisterProtocol();"
                        class="f7">《风尚用户注册协议》</a>
                       	</dd>
                    </dl>
            		<dl style="margin-top: -10px;">
               		 	<dt>&nbsp;</dt><dd><a href="javascript:"><img src="http://resource.fstvgo.com/newimage/zhuce.gif"
                    border="0" onclick="Register(); return false;" /></a></dd>
            		</dl>
        		</div>
    		</div>
		</div>
	</div>
</div> -->

</body>
</html>